package com.ymk.service.impl;

import com.ymk.base.mybatis.DaoRouter;
import com.ymk.base.mybatis.Pagination;
import com.ymk.bo.goods.GoodsSkuPropBO;
import com.ymk.service.IGoodsSkuPropService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 商品规格-属性值表 服务实现类
 * </p>
 *
 * @author 莫参商
 * @since 2023-05-13
 */
@Service
public class GoodsSkuPropService implements IGoodsSkuPropService {

    @Override
    public GoodsSkuPropBO get(Map param) {
    return this.daoRouter.queryForObject("GoodsSkuProp.loadGoodsSkuProp",param);
    }

    @Override
    public List<GoodsSkuPropBO> list(Map param) {
        return this.daoRouter.query("GoodsSkuProp.loadGoodsSkuProp",param);
    }

    @Override
    public List<GoodsSkuPropBO> listForPage(Pagination pagination) {
        return this.daoRouter.query("GoodsSkuProp.loadGoodsSkuPropForPage",pagination);
    }

    @Override
    public void post(GoodsSkuPropBO param) {
        this.daoRouter.insert("AGoodsSkuProp.insertGoodsSkuProp",param);
    }

    @Override
    public void update(GoodsSkuPropBO param) {
        this.daoRouter.update("AGoodsSkuProp.updateGoodsSkuProp",param);
    }

    @Override
    public void del(GoodsSkuPropBO param) {
        this.daoRouter.update("AGoodsSkuProp.delGoodsSkuProp",param);
    }

    @Autowired
    private DaoRouter daoRouter;

}
